<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改电池包信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-information-edit" th:object="${tPartBatteryPackInformation}">
        <input name="batteryBagId" th:field="*{batteryBagId}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">电池包编码：</label>
            <div class="col-sm-8">
                <input name="batteryBagEncoding" th:field="*{batteryBagEncoding}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">电池包型号名称：</label>
            <div class="col-sm-8">
                <input name="batteryBagModelName" th:field="*{batteryBagModelName}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">电池包型号编号：</label>
            <div class="col-sm-8">
                <input name="batteryBagModelId" th:field="*{batteryBagModelId}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">实际容量：</label>
            <div class="col-sm-8">
                <input name="realityCapacity" th:field="*{realityCapacity}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">实际电压：</label>
            <div class="col-sm-8">
                <input name="realityVoltage" th:field="*{realityVoltage}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">实际质量：</label>
            <div class="col-sm-8">
                <input name="realityQuality" th:field="*{realityQuality}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">出厂时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<!--                    <input name="deliveryTime" th:value="${#dates.format(tPartBatteryPackInformation.deliveryTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
                    <input name="deliveryTime" th:field="*{deliveryTime}" class="form-control" placeholder="yyyy-MM-dd" type="date">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">所在电池组编码：</label>
            <div class="col-sm-8">
                <input name="thisBatteryParkEncoding" th:field="*{thisBatteryParkEncoding}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">所在车辆VIN：</label>
            <div class="col-sm-8">
                <input name="thisCarVin" th:field="*{thisCarVin}" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script type="text/javascript">
    var prefix = ctx + "cpart/packege";
    $("#form-information-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/editbatterypackage", $('#form-information-edit').serialize());
        }
    }

    $("input[name='deliveryTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
</script>
</body>
</html>